<%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<jsp:include page="header.jsp"></jsp:include>
	<body>
		<div id="main-content">
			
			<h2>
				欢迎 ${sessionScope.user.username}
			</h2>

			<div class="clear"></div>
			
			<div class="content-box">
				<div class="content-box-header">
					<h3>
						学生信息管理
					</h3>

					<div class="clear"></div>
				</div>
				

				<div class="content-box-content">
					<div class="tab-content default-tab">
						<h4>
							搜索
						</h4>
						<p>
							<form method="get" action="student_search.action">
								<input class="text-input small-input" type="text" id="key"
									name="key" value="${key}" />
								<select name="keyType" class="small-input">
									<option value="studentNum">
										学号
									</option>
									<option value="name">
										姓名
									</option>
									<option value="major">
										专业
									</option>
									<option value="className">
										班级
									</option>
								</select>
								<input class="button" type="submit" id="dosubmit" value="搜索" />
							</form>
						</p>
						<p>
							<a class="button" href="student_toExcle.action?key=${key}&keyType=${keyType}">导出Excle文件</a>
						</p>
					</div>
					
				</div>

				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						
						<table>
							<thead>
								<tr>
									<th>
										<input class="check-all" type="checkbox" />
									</th>
									<th>
										Id
									</th>
									<th>
										学号
									</th>
									<th>
										姓名
									</th>
									<th>
										毕业设计题目
									</th>
									<th>
										操作
									</th>
								</tr>
							</thead>
							<tfoot>
								<tr>
									<td colspan="6">
										<div class="bulk-actions align-left">
											<select name="dropdown">
												<option value="option1">
													Choose an action...
												</option>
												<option value="option2">
													Edit
												</option>
												<option value="option3">
													Delete
												</option>
											</select>
											<a class="button" href="#">Apply to selected</a>
										</div>
										<div class="pagination">
											${page.pageInfo}
										</div>
										<!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
							<tbody>

								<c:forEach items="${page.pageResult}" var="student">
									<tr>
										<td>
											<input type="checkbox" value="${student.id }" />
										</td>
										<td>
											${student.id }
										</td>
										<td>
											${student.studentNum }
										</td>
										<td>
											${student.name }
										</td>
										<td>
											${student.topic.name }
										</td>
										<td>
											
											<a href="student_edit.action?id=${student.id }" title="Edit"><img
													src="resources/images/icons/pencil.png" alt="Edit" /> </a>
											<a href="student_delete.action?id=${student.id }"
												title="Delete"><img
													src="resources/images/icons/cross.png" alt="Delete" /> </a>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
					

				</div>
				
			</div>

			<div id="footer">
				<small> 
					&#169; Copyright 2011 黄淮学院 | 信息工程学校 | <a href="#">Top</a> </small>
			</div>
			
		</div>

	</body>
	
</html>
